﻿package com.logrogue.console.data {
	
	import com.logrogue.ILogRecordImage;
	
	/**
	 * Запись лога с изображением.
	 * 
	 * @version  1.0
	 * @author   meps
	 */
	public class CLogRecordImage extends CLogRecordMessage implements ILogRecordImage {
		
		/**
		 * Конструктор.
		 * 
		 * @param   сохраняемое в логе изображение;
		 */
		public function CLogRecordImage(image:BitmapData, time:int, message:String = null, level:int = 0, module:int = 0, developer:int = 0, file:String = null, line:int = 0) {
			super(message, time, level, module, developer, file, line);
			m_type = TYPE_IMAGE;
			m_image = image;
		}
		
		/**
		 * @inheritDoc
		 */
		public function get image():BitmapData { return m_image; }
		
		public function toString():String {
			return "[CLogRecordImage id:" + m_id +
				", time:" + m_time +
				", level:" + m_level +
				", module:" + m_module +
				", developer:" + m_developer +
				", image:" + m_image +
				", message:" + m_message +
				"]";
		}
		
		///////////////////////////////////////////////////////////////////////
		
		protected var m_image:BitmapData;
		
	}
}